// ws_micro_shop_seller/pages/fxhb/list/list.js
const api = require("../../../../ws_micro_shop/utils/api.js");
const app = getApp();
Page({
  data: {
    abnorData: {
      imgSrc: "/common/static/images/abnor-04.png",
      text: "暂无领取记录"
    }
  },

  onLoad(options) {
    let that = this;
    app.loadCurrencyUnit().then(res => {
      that.setData({
        unit: res.unit
      });
      that.getInfo();
    });
  },

  getInfo() {
    let that = this;
    app.ws_micro_shoprequest({
      url: api.fxhb.list,
      data: {},
      success: res => {
        res.code === 0 &&
          that.setData({
            list: res.data
          });
      }
    });
  },

  go(e) {
    console.log(e);
    app.util.navigateTo("/ws_micro_shop_seller/pages/fxhb/detail/detail", {
      id: e.currentTarget.dataset.id
    });
  }
});
